Skip to content

fix(p2p): do not cache lookup timeouts as misses - #152

Merged
yingdi-shan merged 1 commit into
kvcache-ai:mainfrom
WindSongShaoGe:fix/p2p-timeout-negative-cache
Aug 14, 2026
Merged

fix(p2p): do not cache lookup timeouts as misses#152
yingdi-shan merged 1 commit into
kvcache-ai:mainfrom
WindSongShaoGe:fix/p2p-timeout-negative-cache

Conversation

@WindSongShaoGe

Copy link
Copy Markdown
Contributor

Summary

  • avoid inserting a negative descriptor-cache entry when a P2P lookup times out
  • allow the next layer read to retry peer lookup instead of falling back to the origin for the full miss TTL
  • add a regression test covering repeated reads after lookup timeouts

Why

A lookup timeout means the artifact availability is unknown, not that the
artifact is absent. Caching the timeout as a miss causes subsequent reads for
that layer to fall back to the origin registry until the negative-cache entry
expires.

Validation

  • make test
  • result: passed, exit code 0

Refs #138

@github-actions

Copy link
Copy Markdown
Contributor

OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s).

@yingdi-shan yingdi-shan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for your contribution.

@yingdi-shan
yingdi-shan merged commit c0c6bbb into kvcache-ai:main Aug 14, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants